<template>
    <div>
        <div class="footer" v-if="type != 'none'">
            <div class="footer-top">
                <div class="container td-fbc">
                    <div class="link-box td-fsc">
                        <div class="td-fcc" v-for="(item,index) in articleTop" :key="index">
                            <router-link router-link target="_blank" :to="item.url">{{item.name}}</router-link>
                            <span>|</span>
                        </div>
                        <a @click="$router.push('/helpCenter')">帮助中心</a>
                    </div>
                    <div class="footer-insurance td-fsc">
                        <!-- <img :src="$global.Image.icon_footer4" />
            <span>假一赔十</span>
            <img :src="$global.Image.icon_footer3" />
            <span>100%正品</span>
            <img :src="$global.Image.icon_footer2" />
            <span>放心承诺</span>
            <img :src="$global.Image.icon_footer1" />
            <span>专业配送</span> -->
                        <!-- <img src="../assets/pay/icon_pay_weixin.png" alt=""> -->
                    </div>
                </div>
            </div>
            <div class="footer-info container td-fbs">
                <img class="logo" :src="$global.Image.logo_column_icon" />
                <div class="footer-introduction td-f1">{{footerData.info}}</div>
                <div class="line1"></div>
                <div class="footer-contact">
                    <div class="tit">客服中心</div>
                    <!-- <div class="tel">400-777-9976</div> -->
                    <div class="tel">{{footerData.kefu}}</div>
                    <div class="time">Email:{{footerData.email}}</div>
                    <div class="time" style="width:200px">地址：{{footerData.address}}</div>
                </div>
            </div>
            <div class="link-box platform td-fcc" v-if="articleCenter.length">
                <!-- <div v-for="(item,index) in articleCenter" :key="index">
                    <router-link target="_blank" :to="{name: 'articleDetail', query: {id: item.id,title: item.title}}">{{item.title}}</router-link>
                    <span v-if="index < articleCenter.length - 1">|</span>
                </div> -->
                青岛投道网络科技发展有限公司提供技术支持（0532-8610069）
            </div>
            <div class="footer-copyright td-fcc">
                <!-- <a class="a" href="http://beian.miit.gov.cn" target="_blank">鲁ICP备 18098987号</a>
                <span>Copyright ©2018-2020 yidaiyilusc.com 版权所有</span>
                <div v-for="(item,index) in articleBottom" :key="index">
                    <router-link target="_blank" :to="{name: 'articleDetail', query: {id: item.id,title: item.title}}">{{item.title}}</router-link>
                    <span>|</span>
                </div>
                <span style="padding-left:0;">©Tezuka Productions</span> -->
                {{footerData.copyright}}
            </div>
        </div>
        <div class="footer-blank" v-else></div>
    </div>
</template>

<script>
import { platformArticle, pcSiteBrief, pcSysArticle } from "@api/public";

export default {
    name: "footer",
    props: {
        type: {
            type: String,
            default: "normal",
        },
    },
    data() {
        return {
            articleTop: [
                {url:"/demandList",name:"需求上架"},
                {url:"/oemIndex",name:"生产代工"},
                {url:"/noStandCustomIndex",name:"非标定制"},
                {url:"/deviceServiceIndex",name:"设备维修"},
                {url:"/outSourceIndex",name:"运维外包"},
                {url:"/techChangeIndex",name:"技工改造"},
                {url:"/feedbackIndex",name:"意见反馈"}
            ],
            articleCenter: [],
            articleBottom: [],
            footerData: "",
        };
    },
    watch:{
        "$store.state.app.footerData":function(e){
            this.footerData = e;
        }
    },
    methods: {
        openService() {
            let customerInfo = JSON.parse(localStorage.getItem("customerInfo"));
            window.open(customerInfo[0].dir, "_blank");
        }
    },
};
</script>

<style scoped  lang="scss" scoped>
.footer {
    border-top: solid #dbdbdb 1px;
    .footer-top {
        border-bottom: solid #dbdbdb 1px;
        padding: 16px 0;
        .container {
            font-size: 14px;
            color: #999;
            a {
                color: #333;
            }
            span {
                padding: 0 10px;
            }
        }
        .footer-insurance {
            font-size: 14px;
            img {
                width: 30px;
                height: 30px;
                object-fit: contain;
                display: block;
                margin-left: 20px;
            }
        }
    }
    .footer-info {
        padding: 20px 0;
        .logo {
            width: 104px;
            display: block;
            height: 93px;
            margin-left: 45px;
        }
    }
    .footer-introduction {
        color: #666;
        font-size: 14px;
        line-height: 2;
        padding: 0 0 0 47px;
    }
    .line1 {
        width: 1px;
        height: 125px;
        background: #dbdbdb;
        margin: 0 37px;
    }
    .footer-contact {
        div {
            margin-top: 10px;
        }
        .tit {
            font-size: 16px;
            color: #333;
            margin-bottom: 10px;
        }
        .tel {
            font-size: 24px;
            color: #da213d;
            font-weight: bold;
            margin-top: 0;
        }
        .time {
            font-size: 14px;
            color: #666;
        }
    }
    .footer-copyright {
        text-align: center;
        font-size: 12px;
        color: #999;
        padding-bottom: 10px;
        span {
            padding: 0 10px;
        }
        a {
            font-size: 14px;
            color: #999;
        }
        .a {
            color: #da213d;
            font-size: 13px;
        }
    }
}
.footer-blank {
    height: 100px;
}
.link-box {
    a,
    span {
        transition: all 0.3s;
    }
    a:hover,
    span:hover {
        color: #da213d !important;
    }
}
.platform {
    margin-bottom: 10px;
    font-size: 14px;
    span {
        padding: 0 10px;
        color: #999;
    }
    a {
        color: #333;
    }
}
</style>
